/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package horario.conexion;

import java.sql.Connection;
import java.sql.DriverManager;
import java.util.ResourceBundle;

/**
 *
 * @author Instructor
 */
public class ConectaDB {

    ResourceBundle recursos =
    ResourceBundle.getBundle("horario.conexion.database");

    public Connection getAcceso() throws Exception {
        Class.forName(recursos.getString("driver"));

        Connection conn = DriverManager.getConnection(
                recursos.getString("url"),
                recursos.getString("username"),
                recursos.getString("password"));
        
        if (conn != null){
            System.out.println("se pudo conectar "+conn);
        }


        return conn;
    }
}
